package com.note.simpleshop.module.user.service;
import com.note.simpleshop.entity.TbToken;
import com.note.simpleshop.module.user.dao.TokenRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class TokeService {
    @Autowired
    private TokenRepository tokenRepository;

    public void save(TbToken token) {
        tokenRepository.save(token);
    }

    public TbToken findByToken(String token) {
        return tokenRepository.findByToken(token);
    }
    public void delete(String token)
    {
        tokenRepository.deleteByToken(token);
    }
}
